package com.baidu.bas.core.query;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * erupt通用数据对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EruptQuery implements Serializable {
    List<Condition> conditions;

    List<String> conditionStrings;

    String orderBy;

    /**
     * 根据需要设置 lazy fetch的字段
     */
    List<String> lazyFetchFields = new ArrayList<>();

    public EruptQuery(Condition condition) {
        this.conditions = new ArrayList<>();
        this.conditions.add(condition);
    }
}
